import Vue from 'vue'
import Router from 'vue-router'
import { public_route } from "@/router/public_route"
import { merchant } from "@/router/merchant_router"


Vue.use(Router)
// let public_route2 = []

let loading = {
	path: '/page/loading',
	name: '加载页面',
	component: resolve => require(['../pages/loading'], resolve),
	meta: {
		noAuth: true
	}
}
let login = {
	path: '/page/login',
	name: '登录',
	component: resolve => require(['../pages/login'], resolve),
	meta: {
		noAuth: true
	}
}
let registration = {
  path: '/page',
  name: '注册',
  component: resolve => require(['../pages/registration'], resolve),
  meta: {
    noAuth: true
  }
};


public_route.push(loading);
public_route.push(login);
public_route.push(registration);

public_route.push.apply(public_route, merchant);

Vue.use(Router)
console.log(public_route)
// Router.addRoutes(merchant)
export default new Router({
  routes: public_route
})
